/**
 * @file
 * Implements input related subsystem
 */
#include "c_Engine.h"

/**
 * Initialises the input subsystem 
 */
void wiigi::c_Engine::initInput( void )
{
   // This function initialises the attached controllers
	WPAD_Init();

   return;  
}

/**
 * Scans all supported input devices to any changes
 */
void wiigi::c_Engine::scanInputDevices( void )
{
   WPAD_ScanPads();
   
   for( u32 Idx = 0; Idx < WPAD_MAX_WIIMOTES; Idx++ )
   {
      u32 Data;
      Data = WPAD_ButtonsDown( Idx );
      
      if( Data & WPAD_BUTTON_HOME )
      {
         setFlag( d_HomePressed );
      }
      
   }
   
   return;   
}
